//
//  YYCacheManger.m
//  singleTarget
//
//  Created by   李小云 on 17/9/20.
//  Copyright © 2017年   李小云. All rights reserved.
//

#import "YYCacheManger.h"
#import "SandBoxManger.h"
@implementation YYCacheManger

+(instancetype)manger
{
    static YYCacheManger *CachesManger = nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        CachesManger = [[self alloc]initWithPath:YYCachePathInSandBox()];
        CachesManger.memoryCache.countLimit = 100; //记录条数限制
        CachesManger.diskCache.countLimit = 100;
        CachesManger.memoryCache.autoTrimInterval = 300;
        CachesManger.diskCache.autoTrimInterval = 300;
        
    });
    
    return CachesManger;
    
}

-(instancetype)initWithPath:(NSString *)path
{
    
    return [super initWithPath:path];
    
}

@end
